clear;clc;clearvars;
% 初始化变量维度,种群数,最大迭代次数,搜索区间,F,CR
dim = 5;
popsize = 50;
maxIteration = 1000;
LB = -5.12 * ones(1, dim);
UB = 5.12 * ones(1, dim);
F = 1;
CR = 0.9;
[globalBest, globalBestFitness, FitnessHistory] = DE(popsize, maxIteration,dim, LB, UB, F, CR, @(x)Fun(x));
disp(globalBestFitness);
disp(globalBest);
plot(FitnessHistory);
